<?php
	include('config.php');
	
	$query = 'SELECT u.username, u.user_id FROM USERS u WHERE active=1 ORDER BY username ASC';
	$results = mysql_query($query);
	
	echo '<ul>';
	while($row = mysql_fetch_array($results)) {
		echo '<li><a href="index.php?page=profile&id=' . $row['user_id'] . '">' . $row['username'] . '</a></li>';
	}
	
	echo '</ul>';
	mysql_close($mysql_handle);
?>